<template>
<div class="kuang">
  <Comment :cms="commentData"></Comment>


  
</div>
</template>

<script>
import Comment from '@/components/Comment'
import { page, details } from '@/api/cmt.js'

export default {
  components: {
    Comment
  },
  data() {
    return {
      commentData: [
        {
                "replyTotalCount": 6,
                "children": [
                  {
                    "replyTotalCount": null,
                    "children": null,
                    "nickName": "王五哈哈哈",
                    "replyUserNickname": null,
                    "id": 2,
                    "parentId": 1,
                    "replyUserId": null,
                    "userId": 3,
                    "commentContent": "你干嘛",
                    "createTime": "2023-11-01 18:30:00",
                    "likeNum": 5,
                    "avatarUrl": null
                  },
                  {
                    "replyTotalCount": null,
                    "children": null,
                    "nickName": "鸡哥",
                    "replyUserNickname": "王五哈哈哈",
                    "id": 8,
                    "parentId": 1,
                    "replyUserId": 3,
                    "userId": 4,
                    "commentContent": "测试一下",
                    "createTime": "2023-11-01 18:36:00",
                    "likeNum": 0,
                    "avatarUrl": null
                  },
                  {
                    "replyTotalCount": null,
                    "children": null,
                    "nickName": "鸡哥",
                    "replyUserNickname": null,
                    "id": 9,
                    "parentId": 1,
                    "replyUserId": null,
                    "userId": 4,
                    "commentContent": "测试一下",
                    "createTime": "2023-11-01 18:36:00",
                    "likeNum": 0,
                    "avatarUrl": null
                  },
                  {
                    "replyTotalCount": null,
                    "children": null,
                    "nickName": "鸡哥",
                    "replyUserNickname": null,
                    "id": 98,
                    "parentId": 1,
                    "replyUserId": null,
                    "userId": 4,
                    "commentContent": "测试一下",
                    "createTime": "2023-11-01 18:36:00",
                    "likeNum": 0,
                    "avatarUrl": null
                  },
                  {
                    "replyTotalCount": null,
                    "children": null,
                    "nickName": "鸡哥",
                    "replyUserNickname": null,
                    "id": 988,
                    "parentId": 1,
                    "replyUserId": null,
                    "userId": 4,
                    "commentContent": "测试一下",
                    "createTime": "2023-11-01 18:36:00",
                    "likeNum": 0,
                    "avatarUrl": null
                  },
                  {
                    "replyTotalCount": null,
                    "children": null,
                    "nickName": "鸡哥",
                    "replyUserNickname": null,
                    "id": 9888,
                    "parentId": 1,
                    "replyUserId": null,
                    "userId": 4,
                    "commentContent": "测试一下",
                    "createTime": "2023-11-01 18:36:00",
                    "likeNum": 0,
                    "avatarUrl": null
                  },
                  {
                    "replyTotalCount": null,
                    "children": null,
                    "nickName": "鸡哥",
                    "replyUserNickname": null,
                    "id": 99999,
                    "parentId": 1,
                    "replyUserId": null,
                    "userId": 4,
                    "commentContent": "测试一下",
                    "createTime": "2023-11-01 18:36:00",
                    "likeNum": 0,
                    "avatarUrl": null
                  },
                  {
                    "replyTotalCount": null,
                    "children": null,
                    "nickName": "鸡哥",
                    "replyUserNickname": null,
                    "id": 90004,
                    "parentId": 1,
                    "replyUserId": null,
                    "userId": 4,
                    "commentContent": "测试一下",
                    "createTime": "2023-11-01 18:36:00",
                    "likeNum": 0,
                    "avatarUrl": null
                  },
                  {
                    "replyTotalCount": null,
                    "children": null,
                    "nickName": "鸡哥",
                    "replyUserNickname": null,
                    "id": 90005,
                    "parentId": 1,
                    "replyUserId": null,
                    "userId": 4,
                    "commentContent": "测试一下",
                    "createTime": "2023-11-01 18:36:00",
                    "likeNum": 0,
                    "avatarUrl": null
                  },
                  {
                    "replyTotalCount": null,
                    "children": null,
                    "nickName": "鸡哥",
                    "replyUserNickname": null,
                    "id": 90006,
                    "parentId": 1,
                    "replyUserId": null,
                    "userId": 4,
                    "commentContent": "测试一下",
                    "createTime": "2023-11-01 18:36:00",
                    "likeNum": 0,
                    "avatarUrl": null
                  },
                  {
                    "replyTotalCount": null,
                    "children": null,
                    "nickName": "鸡哥",
                    "replyUserNickname": null,
                    "id": 90007,
                    "parentId": 1,
                    "replyUserId": null,
                    "userId": 4,
                    "commentContent": "测试一下",
                    "createTime": "2023-11-01 18:36:00",
                    "likeNum": 0,
                    "avatarUrl": null
                  },
                  {
                    "replyTotalCount": null,
                    "children": null,
                    "nickName": "鸡哥",
                    "replyUserNickname": null,
                    "id": 9007,
                    "parentId": 1,
                    "replyUserId": null,
                    "userId": 4,
                    "commentContent": "测试一下",
                    "createTime": "2023-11-01 18:36:00",
                    "likeNum": 0,
                    "avatarUrl": null
                  },
                  {
                    "replyTotalCount": null,
                    "children": null,
                    "nickName": "鸡哥",
                    "replyUserNickname": null,
                    "id": 900000,
                    "parentId": 1,
                    "replyUserId": null,
                    "userId": 4,
                    "commentContent": "测试一下",
                    "createTime": "2023-11-01 18:36:00",
                    "likeNum": 0,
                    "avatarUrl": null
                  }
                ],
                "nickName": "鸡哥",
                "replyUserNickname": null,
                "id": 1,
                "parentId": 0,
                "replyUserId": null,
                "userId": 4,
                "commentContent": "大家好",
                "createTime": "2023-11-01 18:23:11",
                "likeNum": 3,
                "avatarUrl": null
              },
              {
                "replyTotalCount": 0,
                "children": [],
                "nickName": "志愿者李四",
                "replyUserNickname": null,
                "id": 3,
                "parentId": 0,
                "replyUserId": null,
                "userId": 2,
                "commentContent": "全体目光向我看齐",
                "createTime": "2023-11-01 18:31:00",
                "likeNum": 0,
                "avatarUrl": null
              },
              {
                "replyTotalCount": 0,
                "children": [],
                "nickName": "志愿者李四",
                "replyUserNickname": null,
                "id": 4,
                "parentId": 0,
                "replyUserId": null,
                "userId": 2,
                "commentContent": "我宣布个事",
                "createTime": "2023-11-01 18:32:00",
                "likeNum": 0,
                "avatarUrl": null
              },
              {
                "replyTotalCount": 0,
                "children": [],
                "nickName": "王五哈哈哈",
                "replyUserNickname": null,
                "id": 5,
                "parentId": 0,
                "replyUserId": null,
                "userId": 3,
                "commentContent": "啊？",
                "createTime": "2023-11-01 18:33:00",
                "likeNum": 0,
                "avatarUrl": null
              },
              {
                "replyTotalCount": 0,
                "children": [],
                "nickName": "鸡哥",
                "replyUserNickname": null,
                "id": 6,
                "parentId": 0,
                "replyUserId": null,
                "userId": 4,
                "commentContent": "哈哈哈",
                "createTime": "2023-11-01 18:34:00",
                "likeNum": 0,
                "avatarUrl": null
              }
      ],

      // /**
      //  * 分页
      //  */
      // background: true,
      // // 每页显示的条数
      // pageSize: 5,
      // // 总记录数
      // totalCount: 100,
      // // 当前页码
      // currentPage: 1,
    }
  },
  methods: {
    // /**
    //  * 刷新页面
    //  */
    // page() {
    //   page(
    //     this.currentPage,
    //     this.pageSize
    //   ).then((res) => {
    //     this.totalCount = res.data.data.total
    //     this.commentData = this.tableData = res.data.data.records
    //   })
    // },

    // /**
    //  * 分页

    //  * @param {Object} val
    //  */
    // handleSizeChange(val) {
    //   // 重新设置每页显示的条数
    //   this.pageSize = val
    //   this.page()
    // },
    // handleCurrentChange(val) {
    //   // 重新设置当前页码
    //   this.currentPage = val
    //   this.page()
    // }
  }
}
</script>

<style>
  .kuang {
    padding-left: 50px;
    padding-right: 50px;
    padding-top: 20px;
    padding-bottom: 20px;
  }
</style>
